#ifndef LINKEDLIST_H_
#define LINKEDLIST_H_

#include<stdio.h>
#include<stdlib.h>
#include "masterIncludes.h"


int init_array(int rv[]);
void push_array(int input, int rv[]);
int avg_array(int rv[]);
int peak_array(int rv[], int print);
void print_peak(int low, int say);
int calibrate(int rv[], int print);
void dead_zone_guess(int low);
int calRng(void);

int calibrateState;

//These are for station 4
/*
#define bphi 		4096
#define bplo 		3775
#define wphi 		3774
#define wplo 		3600
#define shi			3599
#define slo 		2000
#define alhi 		1999
#define allo 		0
*/

//These are for station 8
//*
#define bphi 		3990
#define bplo 		3540
#define wphi 		3540
#define wplo 		2850	//was 3300
#define shi			2850	//was 2600
#define slo 		800	//was 1000
#define alhi 		800		//was 999
#define allo 		0		//was 1
//*/

#define blackplastic 	1
#define whiteplastic 	3
#define steel 			4
#define aluminum 		2
#define home			blackplastic

#define sampNum 5
#define typeNum 4

int bin_black;
int bin_white;
int bin_steel;
int bin_alumn;
int bin_dunno;

int calType;
int calNum;
int calSet[4][20];

int bmax, bmin, wmax, wmin, smax, smin, amax, amin;

#endif /* LINKEDLIST_H_ */
